package edu.eas.admin.controller;

import edu.eas.admin.service.DictTypeService;
import edu.eas.common.api.CommonResult;
import edu.eas.common.pojo.DictType;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author cql
 */
@RestController
@Api(tags = "DictTypeController", description = "字典类型管理")
@RequestMapping("/dict/type")
public class DictTypeController {

    @Autowired
    private DictTypeService dictTypeService;


    @ApiOperation(value = "获取字典选择框列表")
    @GetMapping("/optionselect")
    public CommonResult<List<DictType>> optionselect() {
        List<DictType> dictTypes = dictTypeService.selectDictTypeAll();
        return CommonResult.success(dictTypes);
    }

}
